using UnityEngine;
using UnityEngine.UI;

public class TextArea : MonoBehaviour
{
	[SerializeField]
	private Text m_Text;
	private Animator animator;

	private void Awake()
	{
		base.gameObject.SetActive(value: false);
		animator = GetComponent<Animator>();
	}

	public bool Show(string s)
	{
		m_Text.text = s;
		if (animator != null) animator.SetBool("show", true);
		base.gameObject.SetActive(value: true);
		Invoke("Hide", 5);
		return true;
	}

	private void Hide()
	{
		if (animator != null) animator.SetBool("show", false);
	}
}
